#include<stdio.h>
#include<iostream>
#include<string.h>
#include <algorithm>
using namespace std;
int main()
{
	int hei[10 + 5], h,i,num=0;
	for (i = 0; i < 10; i++)cin >> hei[i];
	cin >> h;
	for (i = 0; i < 10; i++)if (hei[i] <= h + 30)num++;
	cout << num << endl;
	return 0;
}